package model;

import java.net.MalformedURLException;
import java.io.File;
import java.applet.*;

public class Sons {
	public static final String dir = "src/";
	public static final String AudioAbertura = dir+"sound/abertura.wav";
	public static final String AudioNotificacao = dir+"sound/alerta.wav";
	public static final String AudioCaixaRegistradora = dir+"sound/caixaRegistradora.wav";
	public static final String AudioDados = dir+"sound/dadosRolando2.wav";
	public static final String AudioGameOver = dir+"sound/gameOver.mp3";

	private AudioClip abertura;
	private AudioClip notificacao;
	private AudioClip caixaRegistrador;
	private AudioClip dadosRolando;
	private AudioClip gameOver;

	public Sons() throws MalformedURLException {
		carregarAudios();
	}

	@SuppressWarnings("deprecation")
	private void carregarAudios() throws MalformedURLException {
		abertura = Applet.newAudioClip(new File(AudioAbertura).toURL());
		caixaRegistrador = Applet.newAudioClip(new File(AudioCaixaRegistradora).toURL());
		notificacao = Applet.newAudioClip(new File(AudioNotificacao).toURL());
		dadosRolando = Applet.newAudioClip(new File(AudioDados).toURL());
		gameOver = Applet.newAudioClip(new File(AudioGameOver).toURL());
	}
	
	public AudioClip getAudioAbertura(){
		return abertura;
	}
	
	public AudioClip getAudioNotificacao(){
		return notificacao;
	}
	
	public AudioClip getAudioCaixaRegistrador(){
		return caixaRegistrador;
	}
	
	public AudioClip getAudioDadosRolando(){
		return dadosRolando;
	}
	
	public AudioClip getAudioGameOver(){
		return gameOver;
	}

}
